import { defineStore } from 'pinia'

export const useCounterStore = defineStore('counter',{
  state:()=>{
    return {
      name:'昵称',
      heade:'https://th.bing.com/th/id/OIP.HFC8hZ539ZxTNmPJ93z-pwAAAA?w=200&h=200&c=7&r=0&o=5&dpr=1.5&pid=1.7'
    }
  },
  getters:{
    
  },
  actions:{
     setname(name:string){
      localStorage.setItem('username',name)
      this.name = localStorage.getItem('username')||''
    }
  }
})
